/* ====================================================================
 * (#)Header: ServiceException.java
 * (#)Revision: 
 * (#)Date Created: 2009-06-03
 * (#)Created By: Karol Wozniak
 * ====================================================================
 *
 * Copyright (c) 2007 karolak .  All rights reserved.
 *
 * ====================================================================
 * 
 * The software application represented here is the sole property of 
 * karolak. Its unauthorized utilization is expressly prohibited.
 * 
 * ====================================================================
 */
package com.karolak.service.exception;

/**
 * 
 * <code>ServiceException</code> is ....
 * 
 * @author <a href="mailto:kwozniak@hotmail.com">Karol Wozniak</a>
 */
public class ServiceException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	//TODO review it, is it useful ?
	private String serviceMessage;

	public String getServiceMessage() {
		return serviceMessage;
	}

	public void setServiceMessage(String serviceMessage) {
		this.serviceMessage = serviceMessage;
	}

	public ServiceException(String message) {
		super(message);
	}

	public ServiceException(String message, String serviceMessage) {
		super(message);
		setServiceMessage(serviceMessage);
	}

	public ServiceException(String message, Throwable cause) {
		super(message);
	}

	public ServiceException(String message, Throwable cause, String serviceMessage) {
		super(message);
		setServiceMessage(serviceMessage);
	}
	
//	public String toString() {
//		StringBuilder builder = new StringBuilder(super.toString());
//		builder.append(" - ")
//		builder.append(getServiceMessage());
//		return builder.toString();
//	}
}
